class Loop{
    static void main(String[] args){
        int count = 5;
        println("---while...");
        while(count > 0){
            println("count=$count");
            count--;
        }

        println("---for...");
        for(int i = 0; i < 5; ++i){
            println("i=$i");
        }

        println("---do..while...");
        do{
            count++;
            println("count=$count");
        }while(count < 5);

        println("---for..in...");
        int[] arr = 0..4;
        for(int i in arr){
            println("i=$i");
        }
        
        println("---for..in..map...");
        def employee = ["Ken":21,"John":25,"Sally":22];        
        for(emp in employee){            
            println(emp);
        }
    }
}